#ifndef __GUI_TOUCH_H__
#define __GUI_TOUCH_H__

#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include <stdbool.h>
#include "GUI_core.h"
#define Touch_Status_Stack_Size   5



typedef struct
{
	 bool Ispress;  //是否按下
	 int x;         // x按下
 	 int y;         // y按下

	//Touch_Activity_t activity; 

	 
}    Touch_Status_t;

typedef struct
{
	Touch_Status_t  Touch_Status_Stack[Touch_Status_Stack_Size];
    int Top_Index;        //栈顶指针

}Touch_Stack_t;



typedef enum
{  
	TOUCH_Start=0,     //开始
	TOUCH_Click,       //点击事件
	TOUCH_Press,       //按下事件
	TOUCH_Long_Press,  //长按事件
	TOUCH_Release,     //触摸释放
	TOUCH_Double_Press,//双击事件
	TOUCH_Up,          //上滑事件
	TOUCH_Down,        //下滑事件
	TOUCH_Left,        //左滑事件
	TOUCH_Right,       //右滑事件
	TOUCH_End,         //结束
}Touch_Activity_t;



typedef struct
{
	Touch_Activity_t status;   //当前屏幕状态
	uint16_t offset;           //当前位置偏移状态

}Touch_Slider_t;




void GUI_Touch_Init();

bool Touch_is_pressed(void);


void Touch_Status_Stack_Init();
bool Touch_Status_Stack_Is_Empty(Touch_Stack_t *Touch_Stack);
bool Touch_Status_Stack_Is_Full(Touch_Stack_t *Touch_Stack);
bool Touch_Status_Stack_Push(Touch_Stack_t *Touch_Stack,Touch_Status_t *touch_status);
uint8_t Touch_Status_Stack_Num(Touch_Stack_t *Touch_Stack);
void Touch_Status_Stack_data_Anslaysic(Touch_Stack_t *Touch_Stack);

uint8_t Touch_Status_Stack_Is_Init();


#endif
